﻿using System;
using System.Text;
using CatClient;
using PostSharp.Aspects;

namespace PsCat
{
	// Token: 0x02000004 RID: 4
	public static class CatAttributeExtension
	{
		// Token: 0x0600000A RID: 10 RVA: 0x000021C5 File Offset: 0x000003C5
		public static string NameFormClassMethod(this ICatAttributeExtension that, MethodExecutionArgs args)
		{
			Type declaringType = args.Method.DeclaringType;
			return (((declaringType != null) ? declaringType.Name : null) ?? string.Empty) + "." + args.Method.Name;
		}

		// Token: 0x0600000B RID: 11 RVA: 0x000021FC File Offset: 0x000003FC
		public static string MethodParams(this ICatAttributeExtension that, MethodExecutionArgs args)
		{
			int count = args.Arguments.Count;
			StringBuilder stringBuilder = new StringBuilder();
			for (int i = 0; i < count; i++)
			{
				object arg = that.IgnoreArgs.ContainsKey(i) ? "***" : args.Arguments[i];
				stringBuilder.Append(string.Format("arg{0}={1}&", i, arg));
			}
			return stringBuilder.ToString();
		}

		// Token: 0x0600000C RID: 12 RVA: 0x00002267 File Offset: 0x00000467
		public static string HttpContextParams(this ICatAttributeExtension that, MethodExecutionArgs args)
		{
			return CatCoreUtils.HttpContextParams();
		}
	}
}
